package com.boot.aqs;

/**
 * @Package com.boot.aqs
 */
public class T1 extends Thread{
    private Object o1;
    private Object o2;
    public T1(Object o1,Object o2){
        this.o1=o1;
        this.o2=o2;
    }

    @Override
    public void run() {
        synchronized (o1){
            try {
                Thread.sleep(3000l);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            System.out.println("lock o1");

            synchronized (o2){
                System.out.println("lock o2");
            }
        }


    }
}
